package org.extremengine.demo;

import java.awt.Graphics;

import org.extremengine.common.RigidBody;
import org.extremengine.common.Velocity;
import org.extremengine.shape.Circle;

/**
 * 抛物线
 * 
 * @author yuxing
 * 
 */
public class PanelThrow extends BasePanelWorld {

	RigidBody ball;

	public PanelThrow(DemoCallback demoCallback) {
		super(demoCallback);
	}

	@Override
	public void initDemoWorld() {
		super.initDemoWorld();
		ball = world.createRigidBody(new Object(), 0, 0.5, 10, new Circle(2, 1, 1));
		ball.setV(new Velocity(25.0, 65));
	}


	@Override
	public void paint(Graphics g) {
		super.paint(g);
		if (!world.isRunning()) {
			super.drawRigidBody(g, ball);
		}
	}
}
